package runner

import (
	"fmt"

	"core/service"
)

func RunProject(projectId string) {
	project, err := service.FindProjectById(projectId)
	if err != nil {
		panic(err)
	}

	workflow, err := service.FindWorkflowByRefAndVersion(project.WorkflowRef, project.WorkflowVersion)
	if err != nil {
		panic(err)
	}

	node, err := workflow.FirstNode()

	fmt.Println(node)
	fmt.Println(err)

}
